//
export const mixin = {
    method: {
        format(date) {
            let date2 = new Date(date);
            let y = date2.getFullYear();
            let m = date2.getMonth() + 1;
            m = m < 10 ? ('0' + m) : m;
            let d = date2.getDate();
            d = d < 10 ? ('0' + d) : d;
            let h = date2.getHours();
            h = h < 10 ? ('0' + h) : h;
            let minute = date2.getMinutes();
            minute = minute < 10 ? ('0' + minute) : minute;
            return y + '-' + m + '-' + d + ' ' + h + ':' + minute;
        }
    }
}
